import React, { Component } from 'react';

import './index.css';

class Header extends Component {
  constructor(props){
    super(props);
    this.state={
        name:'header'
    }
  }/**/
  goBack(){
    return this.props.go && <span onClick={this.props.go.goBack}>返回</span>
  }
  render() {
    return (
      <header className="Header">
        { this.goBack() }
        <p>{this.props.titleText}</p>
      </header>
    );
  }
}
/*{
          this.state.list.map((item,index)=>{
            return <p key={index} onClick={this.delItem.bind(this)}>{item}</p>
          })
        }*/
export default Header;
